<?php 
	$this->load->view('header');
	$this->load->view('header_end');
	$this->load->view('banner_menu_top');
	//$this->load->view('modules/mod_banner_center');
?>
<div id="content">
	<div id="left_column">
		<?php
			$this->load->view('modules/mod_menu_product');
			$this->load->view('modules/mod_new_product');
			$this->load->view('modules/mod_faq');
			$this->load->view('modules/mod_support_online');
			$this->load->view('modules/mod_visitor_counter');
		?>
	</div>
	<div id="main_column">
		<div class="list_items">
			<?php 
				$data_menu 		= get_cat_product_byid_material(5);
				if(count($data_menu) > 0): 
				foreach($data_menu as $data_cat): 
				$data_view = get_product_page($data_cat['nid']);
				if(count($data_view) > 0):
			?>
				<h3 class="title_content"><a href="<?php echo base_url().'product/list_product/5/'.$data_cat['nid']; ?>"><?php echo $data_cat['ccat_products'] ?></a></h3>
				
				<?php 
				$count = 1;
				$num_colum = 4;	
				foreach($data_view as $data): 
				?>
				<?php if($count > 1 && $count%$num_colum == 1): ?>
				</div>
				<?php endif; ?>
				<?php if($count == 1 OR $count%$num_colum == 1 ): ?>
				<div class="items_row">
				<?php endif; ?>
					<?php if($count > 1 && $count%4==0): ?>
					<div class="items_mod last_list">
					<?php else: ?>
					<div class="items_mod">
					<?php endif; ?>
						<a href="<?php echo base_url().'product/detail/'.$data['nid'] ?>">
							<?php if($data['cimage_resize'] !=''): ?>
								<img src="<?php echo base_url().'upload/images_product/resize_images/'.$data['cimage_resize'] ?>" alt="<?php echo $data['cproducts'] ?>" width="150" height="150" />
							<?php else: ?>
								<img src="<?php echo base_url().'images/noimage.jpg'; ?>" alt="<?php echo $data['cproducts'] ?>" width="150" height="150" /></a>
							<?php endif; ?>
						<p class="title"><a href="<?php echo base_url().'product/detail/'.$data['nid'] ?>"><?php echo $data['cproducts'] ?></a></p>
					</div>	
				<?php if($count == count($data_view)): ?>
				</div>
				<?php endif; ?>
				<?php
					$count++;
					endforeach; 
				?>		
			<?php 
				endif; 
				endforeach; 
				 endif; 
			?>	
		</div>
	</div>
	<!--<div id="right_column">right column</div>-->
</div>
<?php 
	$this->load->view('footer');
?>
